import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './ui'
import './ui-diy'
import './http'

Vue.config.productionTip = false


Vue.directive('submit', {
    inserted: function (e, node) {
        e.onsubmit = function (eve) {
            node.value(eve);
            return false;
        }
    }
})


Vue.prototype.$validater = function (name) {
    return new Promise((resolve) => {
        this.$refs[name].validate((v) => {
            if (v) {
                resolve()
            }
        })
    })
}

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
